package process

import (
	"chat/common/msg"
	"encoding/json"
	"fmt"
)

func outputGroupMes(mes *msg.Message) {
	// 显示群发消息
	var smsMes msg.SmsMes

	err := json.Unmarshal([]byte(mes.Data), &smsMes)
	if err != nil {
		fmt.Println("outputGroupMes json.Unmarshal error = ", err)
		return
	}
	info := fmt.Sprintf("用户id:\t%d 对大家说:\t%v \n", smsMes.UserId, smsMes.Content)
	fmt.Println(info)
}
